package com.example.xzs.admin.userlogin.security;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

@Getter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class UserLogDetails extends User {
    private Long id;

    public UserLogDetails(String username,
                          String password,
                          boolean enabled,
                          Collection<? extends GrantedAuthority> authorities,
                          Long id) {
        super(username, password, enabled, true, true, true, authorities);
        this.id = id;
    }
}
